package com.jiaai.cloud.chatroom.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.jiaai.cloud.live.entity.TLiveBroadcast;
import com.jiaai.cloud.user.entity.TUser;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 聊天室成员表
 * </p>
 *
 * @author 佳爱网络科技
 * @since 2017-08-01
 */
@TableName("t_chat_room_member")
public class TChatRoomMember extends Model<TChatRoomMember> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 聊天室Id
     */
	private Integer roomId;
    /**
     * 用户Id
     */
	private String userId;
    /**
     * 角色
     */
	private String role;
    /**
     * 0审核 1通过
     */
	private Integer status;
	@JSONField(format = "YYYY-MM-dd")
	private Date time;


	@TableField(exist = false)
	private List<TChatRoom> tChatRoomList;

	@TableField(exist = false)
	private List<TUser> tUserList;

	public List<TUser> gettUserList() {
		return tUserList;
	}

	public void settUserList(List<TUser> tUserList) {
		this.tUserList = tUserList;
	}

	public List<TChatRoom> gettChatRoomList() {
		return tChatRoomList;
	}

	public void settChatRoomList(List<TChatRoom> tChatRoomList) {
		this.tChatRoomList = tChatRoomList;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getRoomId() {
		return roomId;
	}

	public void setRoomId(Integer roomId) {
		this.roomId = roomId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
